package vip.sweet.biz.modular.cultural.service.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import vip.sweet.biz.modular.cultural.entity.BizCulturalEvents;
import vip.sweet.biz.modular.cultural.mapper.BizCulturalEventsMapper;
import vip.sweet.biz.modular.cultural.params.BizCulturalEventsAddParams;
import vip.sweet.biz.modular.cultural.service.BizCulturalEventsService;

/**
 * @author ASUS
 * @Date 2025/10/5 0:05
 * @Descripition
 */
@Service
public class BizCulturalEventsServiceImpl extends ServiceImpl<BizCulturalEventsMapper, BizCulturalEvents> implements BizCulturalEventsService {
    @Override
    public boolean add(BizCulturalEventsAddParams addCulturalEventsParams) {
        if (ObjectUtil.isNotEmpty(addCulturalEventsParams))
            return save(BeanUtil.toBean(addCulturalEventsParams, BizCulturalEvents.class));
        return false;
    }
}
